package com.whmnx.my.ui.viewmodel;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.whmnx.base.bean.BeanRecordBean;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.base.ItemViewModel;

/**
 * author : huang
 * date   : 2020/9/24 0024 17:50
 * version: 1.0
 * @author Administrator
 */
public class WithdrawItemViewModel2 extends ItemViewModel {

    public ObservableField<String> totalRevenue = new ObservableField<>("");
    public ObservableField<String> datetime = new ObservableField<>("");

    public WithdrawItemViewModel2(@NonNull BaseViewModel viewModel, BeanRecordBean.BeanRecordListBean beanRecordListBean) {
        super(viewModel);
        totalRevenue.set(beanRecordListBean.getTotalRevenue() + "");
        datetime.set(beanRecordListBean.getDatetime().split(" ")[0]);
    }
}
